<?php
/**
 * @package EDO
 * @subpackage UI
 *
 */
abstract class renderer_base
{
	
	/**
	 * LEAD Application object
	 *
	 * @var Application
	 */
	protected $lead;
	protected $path;
	protected $folderName;
		
	public function __construct()
	{
		$this->lead = LEAD::application();
		$this->path = dirname(__FILE__) . "/templates";
		
		$split = explode("_", get_class($this), 2);
		
		$this->folderName = $split[1];
		
	}
	
	
	public function getPrefix()
	{
        $renderer = DatatypeRenderer::getInstance();

        $name = 'field';
        
        foreach($renderer->getOwnerStack() as $owner)
        {
            $name .= '[' . $owner . ']';
        }

        return $name;
	}
	

    public function getName()
    {
        $name = $this->getPrefix();
        
        $renderer = DatatypeRenderer::getInstance();
        
        $name .= '[' . $this->lead->viewer->fObject->getName() . ']';
        
        foreach($renderer->getOwnerStack() as $owner)
        {
             // $name .= ']';
        }
      
        return $name;              
        
    }

	
	
	
	
	
}
?>